﻿Public Class EmployeeController
    Inherits BaseController(Of Employee)
    Public Shared Function Login(ByVal Account As String, ByVal Password As String) As Employee
        Dim query = (From emp In dbo.Employees _
                    Where emp.Account Is Account _
                    AndAlso emp.Password Is ConvertHelper.ToMD5(Password) _
                    Select emp).Take(1).SingleOrDefault()
        If query IsNot Nothing Then
            Return query
        Else
            Return Nothing
        End If
    End Function
End Class
